import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from "../views/MainView";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Main,
    redirect: 'bookshelf',
    children: [
      {
        path: '/my',
        name: 'my',
        component: () => import('../views/My/MyView.vue'),
        meta: {
          bottomBar: true
        }
      },
      {
        path: '/swiper',
        name: 'swiper',
        component: () => import('../views/SwiperView.vue'),
        meta: {
          bottomBar: true
        }
      },
      {
        path: '/bookshop',
        name: 'bookshop',
        component: () => import('../views/BookShop/ShopView.vue'), meta: {
          bottomBar: true
        }
      },
      {
        path: '/bookshelf',
        name: 'bookshelf',
        component: () => import('../views/BookShelf/BookShelf.vue'), meta: {
          bottomBar: true
        }
      },
      {
        path: '/classify',
        name: 'classify',
        component: () => import('../views/Classify/ClassifyView.vue'), meta: {
          bottomBar: true
        }
      },
      {
        path: '/ranking',
        name: 'ranking',
        component: () => import('../views/Ranking/RankingView.vue'),
      },
      {
        path: '/comment',
        name: 'comment',
        component: () => import('../views/Comment/CommentView.vue'),
      },
      {
        path: '/allcomment',
        name: 'allcomment',
        component: () => import('../views/Comment/AllComment.vue'),
      },
      {
        path: '/search',
        name: 'search',
        component: () => import('../views/Search/SearchView.vue'),
      },
      {
        path: '/catalogue',
        name: 'catalogue',
        component: () => import('../components/common/CatalogueCom.vue'),
      },
      {
        path: '/novel',
        name: 'novel',
        component: () => import('../views/Novel/NovelView.vue'),
      },

    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/Login/LoginView.vue')
  },
  {
    path: '/player',
    name: 'player',
    component: () => import('../views/Player/PlayerView.vue')
  },

]

const router = new VueRouter({
  mode: 'hash',
  // base: process.env.BASE_URL,
  routes
})

export default router
